package com.zwps.biz.api.enums;

public enum ZAchievementEnum {
    WATER_SALE(1, "供水"),
    ELECTRICITY_SALE(2, "发电"),
    IRRIGATION(3, "灌溉"),
    OTHER(4, "防洪");

    private final int value;
    private final String description;

    // 构造方法
    ZAchievementEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    // 获取枚举值
    public Integer getValue() {
        return value;
    }

    // 获取描述
    public String getDescription() {
        return description;
    }

    public static ZAchievementEnum fromValue(int value) {
        for (ZAchievementEnum type : ZAchievementEnum.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        throw new IllegalArgumentException("无效的类型值: " + value);
    }


}
